package com.example.homecunter.video.viewmodel;

import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.MutableLiveData;

import com.example.common.utils.BaseEntity;
import com.example.homecunter.video.entity.ChannelEntity;
import com.example.homecunter.video.entity.VideoEntity;
import com.example.homecunter.video.repository.ChannelRepository;
import com.example.mvvmcore.viewmodel.BaseViewModel;

import java.util.List;

public class ChannelViewModel extends BaseViewModel<ChannelRepository> {
    public ChannelViewModel(LifecycleOwner owners) {
        super(owners);
    }

    @Override
    protected void releaseResource() {

    }

    @Override
    protected void initResource() {

    }

    @Override
    protected ChannelRepository createRepository() {
        return new ChannelRepository();
    }

    public MutableLiveData<BaseEntity<List<ChannelEntity>>> channel(){
        return mRepository.channel();
    }


    public MutableLiveData<BaseEntity<List<VideoEntity>>> video(int channelid,int page){
        return mRepository.videoData(channelid,page);
    }

}
